import request from '@/utils/request'

// 查询io点位列表
export function listPoint(query) {
  return request({
    url: '/equipment/point/list',
    method: 'get',
    params: query
  })
}

// 查询io点位详细
export function getPoint(ioPointId) {
  return request({
    url: '/equipment/point/' + ioPointId,
    method: 'get'
  })
}

// 新增io点位
export function addPoint(data) {
  return request({
    url: '/equipment/point',
    method: 'post',
    data: data
  })
}

// 修改io点位
export function updatePoint(data) {
  return request({
    url: '/equipment/point',
    method: 'put',
    data: data
  })
}

// 删除io点位
export function delPoint(ioPointId) {
  return request({
    url: '/equipment/point/' + ioPointId,
    method: 'delete'
  })
}
